/**
 * Description:封装了分页对象，用于分页显示
 * Company:济南东域信息科技有限公司
 * @author lld
 * @date 2014-1-14
 * */
package com.douyu.water.core;

import java.io.Serializable;

public class PagePara 
implements Serializable
{
	private int pageIndex;
	private int pageSize;
	private int recordStart;
	private int total;

	public int getPageIndex() {
		return pageIndex <= 0 ? 1 : pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;		
	}

	public int getPageSize() {
		return pageSize <= 0 ? 15 : pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
		
	}

	public int getRecordStart() {
		return (getPageIndex() -1) * getPageSize();
	}

	public void setRecordStart(int recordStart) {
		this.recordStart = recordStart;
	}

	public int getRecordEnd() {
		return getPageIndex() * getPageSize();
	}

	public int getTotal() {
		return total < 0 ? 0 : total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

}